package com.example.demo.conf;

import org.springframework.security.oauth2.provider.token.store.redis.StandardStringSerializationStrategy;

/**
 * TODO
 *
 * @author funcas
 * @since 1.0
 */
public class ProtostuffSerial extends StandardStringSerializationStrategy {
    @Override
    protected <T> T deserializeInternal(byte[] bytes, Class<T> clazz) {
        return ProtoStuffSerializerUtil.deserialize(bytes, clazz);
    }

    @Override
    protected byte[] serializeInternal(Object object) {
        return ProtoStuffSerializerUtil.serialize(object);
    }
}
